import request from '@/utils/request'

// 查询场站电区间价设置列表
export function listPrice(query) {
  return request({
    url: '/operator/electricityPrice/list',
    method: 'get',
    params: query
  })
}

// 查询场站电区间价设置详细
export function getPrice(id) {
  return request({
    url: '/operator/electricityPrice/' + id,
    method: 'get'
  })
}

// 新增场站电区间价设置
export function addPrice(data) {
  return request({
    url: '/operator/electricityPrice',
    method: 'post',
    data: data
  })
}

// 修改场站电区间价设置
export function updatePrice(data) {
  return request({
    url: '/operator/electricityPrice',
    method: 'put',
    data: data
  })
}

// 删除场站电区间价设置
export function delPrice(id) {
  return request({
    url: '/operator/electricityPrice/' + id,
    method: 'delete'
  })
}

// 导出场站电区间价设置
export function exportPrice(query) {
  return request({
    url: '/operator/electricityPrice/export',
    method: 'get',
    params: query
  })
}

// 查询运营商列表
export function getOperatorList() {
  return request({
    url: '/smart/subsidiary/getOperatorList',
    method: 'get'
  })
}

// 查询场站列表
export function getStationList(query) {
  return request({
    url: '/operator/electricityPrice/getStationList',
    method: 'get',
    params: query
  })
}

// 查询场站列表基于编码
export function getStationListByCode(query) {
  return request({
    url: '/operator/electricityPrice/getStationListByCode',
    method: 'get',
    params: query
  })
}

// 查询场站电区间价设置详细
export function getPriceLast(query) {
  return request({
    url: '/operator/electricityPrice/getChargeStationPrice',
    method: 'get',
    params: query
  })
}

// 效验是否存在
export function getValidationRepeat(data) {
  return request({
    url: '/operator/electricityPrice/getValidationRepeat',
    method: 'post',
    data: data
  })
}
